import { mapGetters } from "vuex"

export const playlistMixin = {
  computed: {
    ...mapGetters([
      'playlist'
    ])
  },
  mounted() {
    this.handelPlayList(this.playlist)
  },
  activated() {
    this.handelPlayList(this.playlist)
  },
  watch: {
    playlist(newVal) {
      this.handelPlayList(newVal)
    }
  },
  methods: {
    handelPlayList() {
      throw new Error('handelPlayList method error')
    }
  },
}
